<template>
  <div class="nav-list">
    <van-grid :column-num="4" :border="false">
      <van-grid-item
        v-for="(item, i) in navList"
        :key="item.title"
        :icon="item.imgSrc || `./imgs/nav${i + 1}.png`"
        :text="item.title"
      />
    </van-grid>
  </div>
</template>
<script>
import * as api from "@/api/index.js";
export default {
  data() {
    return {
      navList: [],
    };
  },
  async mounted() {
    let res = await api.getNavList();
    this.navList = res.result;
    console.log(res);
  },
};
</script>

<style scoped lang="less">

</style>